/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Server.DTO;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Trung
 */
public class Column {
    private String name;
    private String dataType;
    private boolean isPrimaryKey;
    private boolean allowNull;
    private List<Row> rowsList;
    
    public Column()
    {
        name = "";
        dataType = "";
        isPrimaryKey = false;
        allowNull = false;
        rowsList = new ArrayList<Row>();
    }
    
    public Column(String _name, String _type, boolean _isPrimaryKey, boolean _allowNull, List<Row> _rowsList)
    {
        name = _name;
        dataType = _type;
        isPrimaryKey = _isPrimaryKey;
        allowNull = _allowNull;
        rowsList = _rowsList;
    }

    public Column(Column _column)
    {
        name = _column.name;
        dataType = _column.dataType;
        this.isPrimaryKey = _column.isPrimaryKey;
        this.allowNull = _column.allowNull;
        this.rowsList = _column.rowsList;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the dataType
     */
    public String getDataType() {
        return dataType;
    }

    /**
     * @param dataType the dataType to set
     */
    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    /**
     * @return the isPrimaryKey
     */
    public boolean isIsPrimaryKey() {
        return isPrimaryKey;
    }

    /**
     * @param isPrimaryKey the isPrimaryKey to set
     */
    public void setIsPrimaryKey(boolean isPrimaryKey) {
        this.isPrimaryKey = isPrimaryKey;
    }

    /**
     * @return the allowNull
     */
    public boolean isAllowNull() {
        return allowNull;
    }

    /**
     * @param allowNull the allowNull to set
     */
    public void setAllowNull(boolean allowNull) {
        this.allowNull = allowNull;
    }

    /**
     * @return the rowsList
     */
    public List<Row> getRowsList() {
        return rowsList;
    }

    /**
     * @param rowsList the rowsList to set
     */
    public void setRowsList(List<Row> rowsList) {
        this.rowsList = rowsList;
    }
}
